using System;
using System.Web;
using System.Web .UI;
using System.Web .UI.WebControls;
using System.Collections.Generic;
using System.Text;

namespace Component
{
    public class ControlHelper
    {
        // fuction delete data in textbox
        public static void DeleteDataInTexbox(Page current)
        {
            foreach (Control c in current.Controls)
            {
                if (c is System.Web.UI.WebControls.TextBox)
                {
                    ((System.Web.UI.WebControls.TextBox)c).Text = "";
                }
            }
        }
        // setdroplistvalue
        public static void SetDropListValue(ref DropDownList drl, string str)
        {
            ListItem li = drl.Items.FindByText(str);
            if (li != null)
            {
                int index = drl.Items.IndexOf(li);
                drl.SelectedIndex = index;
            }
        }
        

    }
}
